home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 April / Macworld (1999-04).dmg / Serious Software / GrooveMaker demo / GrooveMaker Demo / Media / MenuSong.dxr / 00034.ls < prev    next >
Encoding:
Text File  |  1998-07-27  |  1.1 KB  |  46 lines

  1. on mouseEnter
  2.   if the visible of window "Help" then
  3.     tell window "help"
  4.       go("volume")
  5.     end tell
  6.   end if
  7. end
  8.  
  9. on mouseLeave
  10.   if the visible of window "Help" then
  11.     tell window "help"
  12.       go("start")
  13.     end tell
  14.   end if
  15. end
  16.  
  17. on mouseDown
  18.   global gDb, gSong
  19.   if not (the visible of window "Help") then
  20.     set start to integer(field "fieldMasterVol") - 16
  21.     repeat while the mouseDown
  22.       set the visible of sprite 12 to 1
  23.       set masterVol to start + (435 - the mouseV)
  24.       if masterVol > gDb then
  25.         set masterVol to gDb
  26.       end if
  27.       if masterVol < 0 then
  28.         set masterVol to 0
  29.       end if
  30.       put masterVol into field "fieldMasterVol"
  31.       if gSong <> EMPTY then
  32.         set the volume of member "preview" to 255 * integer(masterVol) / 128
  33.       end if
  34.       IKMasterVolume(masterVol)
  35.     end repeat
  36.     set the textFont of member "fieldMasterVol" to "GMfont"
  37.     set the foreColor of member "fieldMasterVol" to 54
  38.   end if
  39. end
  40.  
  41. on mouseUp
  42.   if not (the visible of window "Help") then
  43.     set the visible of sprite 12 to 0
  44.   end if
  45. end
  46.